SRCS := $(wildcard *.c)
OBJS := $(patsubst %.c,%.o,$(SRCS))
TARGET := updater

all:$(TARGET)
	
$(TARGET):$(OBJS)
	$(LD) -lpthread $^ -o $@
	$(STRIP) $@
	
%.o : %.c
	$(CC) $(CFLAGS) -c $^ -o $@
	@echo ""

install:
	@$(CP) $(TARGET) $(ROOTFS_SBIN_DIR)

clean:
	$(RM) *.o
	$(RM) $(TARGET)

.PHONY: all clean install
